Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Send iCal as mime content with text/calendar type...

For example:
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim ws as New NotesUIWorkSpace
Set cdoc = ws.CurrentDocument.Document
dim rtiBody as NotesRichTextItem
Dim doc As New NotesDocument(db)
Set db = session.CurrentDatabase
dim subj As String, user As String

user = ' "...@gmail.com"

dim icsText as String 'iCalendar text
icsText = ... 'set iCalendar text from your source



Dim parent As NotesMimeEntity
Dim child1 As NotesMimeEntity
Dim child2 As NotesMimeEntity
Dim header As NotesMimeHeader
Dim stream As NotesStream
session.ConvertMime = False

' Create all the Entities - one parent, two children.
Set parent = doc.CreateMIMEEntity
Set child2 = parent.CreateChildEntity
Set child1 = parent.CreateChildEntity(child2)
' Create so that children 1 & 2 are siblings

' Update all the header information.
' At this point we cannot create another "Content-Type"
' entity on the parent, but we can update the existing value
Set header = parent.GetNthHeader("Content-Type")
Call header.SetHeaderValAndParams({multipart/alternative; boundary="} _
& child1.BoundaryStart & {"})
Set header = child2.CreateHeader("Content-ID")
Call header.SetHeaderVal("<_1_" & doc.UniversalID & ">")

' Build the entire HTML table, including a reference _
' to an image that is yet to come (its ID
' was created above). This HTML goes into child 1
Set stream = session.CreateStream

Call stream.WriteText({<table border="1" width="75%" align="center">})
Call stream.WriteText({<tr><td>})
Call stream.WriteText({<img src=cid:_1_} & doc.UniversalID & {>})
Call stream.WriteText({</td></tr></table>})
Call child1.SetContentFromText(stream, "text/html", ENC_NONE)
Call stream.Truncate

Call stream.WriteText(icsText)
Call child2.SetContentFromText(stream, "text/calendar", ENC_NONE)
Call child2.EncodeContent(ENC_BASE64)
Call stream.Close

call doc.CloseMIMEEntities(True)


call doc.Save(true, true)
Call doc.Send( False, user)


Feedback response number WEBB7RTGCQ created by ~Andy Brejipyterynds on 05/07/2009

Appointment from Notes >> Outlook 2... (~Justin Zekaman... 4.May.09)
. . Send iCal as mime content with text... (~Andy Brejipyte... 7.May.09)
. . . . Great stuff, thanks! (~Justin Zekaman... 8.May.09)
. . No Answer yet? (~Justin Zekaman... 6.May.09)
. . . . Build Web Services (~Rebecca Zeknup... 6.May.09)
. . . . . . you mean... (~Justin Zekaman... 6.May.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS